#include <stdio.h>

int main(){
    int score, i = 0, sum = 0;
    next:printf("请输入第%d个学生成绩(输入-1结束)...\n", i+1);
    scanf("%d", &score);
    if(score != -1){
        sum += score;
        i++;
        goto next;
    }
    if(i != 0){
        printf("%d个学生的平均成绩是%d\n", i, sum / i);
    }

    return 0;

}